<!DOCTYPE html>
<html lang="en" xmlns:th="http://thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <style>
        p {
            font-size: 3em;
            font-weight: 10;
            text-align: center;
        }
    </style>

    <title>上架商品管理</title>
</head>
<body>
<header th:replace="common/top.html"></header>
<section class="content">
    <main>
        <div class="container">
            <table border="1" class="table table-striped">
                <p>在售商品表</p>
                <thead>
                <tr>
                    <th>ProductId</th>
                    <th>ProductName</th>
                    <th>商品剩余数目</th>
                    <th>下架商品</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="onShelfProduct:${onSellProductList}">
                    <td th:text="${onShelfProduct.productId}"></td>
                    <td th:text="${onShelfProduct.name}"></td>
                    <td th:text="${onShelfProduct.number}"></td>
                    <td>
                        <button><a th:href="@{/catalog/updateOnShelf(productId=${onShelfProduct.productId})}">下架</a>
                        </button>
                    </td>
                </tr>

                </tbody>
            </table>

            <br>
            <p>下架商品表</p>
            <table border="1" class="table table-striped">
                <thead>
                <tr>
                    <th>OutShelfProductId</th>
                    <th>OutShelfProductName</th>
                    <th>商品剩余数量</th>
                    <th>上架商品</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="outShelfProduct:${outShelfProductList}">
                    <td th:text="${outShelfProduct.productId}"></td>
                    <td th:text="${outShelfProduct.name}"></td>
                    <td th:text="${outShelfProduct.number}"></td>
                    <td>
                        <button><a th:href="@{/catalog/updateOutShelf(productId=${outShelfProduct.productId})}">上架</a>
                        </button>
                    </td>
                </tr>
                </tbody>
            </table>

        </div>
    </main>
</section>
<header th:replace="common/bottom.html"></header>

</body>
</html>